home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form maForm
- BackColor = &H00808000&
- BorderStyle = 1 'Fixed Single
- Caption = "Memory Alert 1.1"
- ClientHeight = 3315
- ClientLeft = 2595
- ClientTop = 2265
- ClientWidth = 3420
- Height = 3720
- Icon = MA.FRX:0000
- Left = 2535
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 3315
- ScaleWidth = 3420
- Top = 1920
- Width = 3540
- Begin Frame Frame1
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1815
- Left = 60
- TabIndex = 6
- Top = 1440
- Width = 3300
- Begin PictureBox Picture1
- BackColor = &H00000000&
- BorderStyle = 0 'None
- ForeColor = &H00404080&
- Height = 12
- Left = 1248
- ScaleHeight = 15
- ScaleWidth = 2025
- TabIndex = 39
- Top = 1104
- Width = 2028
- End
- Begin ListBox tmList
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 1005
- Left = 45
- Sorted = -1 'True
- TabIndex = 8
- Top = 720
- Width = 1155
- End
- Begin OptionButton showTasks
- BackColor = &H00808000&
- Caption = "&Tasks"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 252
- Left = 48
- TabIndex = 32
- Top = 384
- Value = -1 'True
- Width = 1152
- End
- Begin OptionButton showModules
- BackColor = &H00808000&
- Caption = "&Modules"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 252
- Left = 48
- TabIndex = 33
- Top = 144
- Width = 1152
- End
- Begin Label tStackUsed
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2568
- TabIndex = 15
- Top = 1500
- Width = 672
- End
- Begin Label Label7
- BackColor = &H00808000&
- Caption = " Most used:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1260
- TabIndex = 14
- Top = 1500
- Width = 900
- End
- Begin Label tStackSize
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2568
- TabIndex = 12
- Top = 1320
- Width = 672
- End
- Begin Label Label6
- BackColor = &H00808000&
- Caption = "Stack size:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1260
- TabIndex = 11
- Top = 1320
- Width = 900
- End
- Begin Label tTaskMemoryBytes
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2568
- TabIndex = 23
- Top = 1140
- Width = 672
- End
- Begin Label tTaskMemory
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2148
- TabIndex = 22
- Top = 1140
- Width = 372
- End
- Begin Label Label18
- BackColor = &H00808000&
- Caption = "GlobalAlloc:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1248
- TabIndex = 21
- Top = 1152
- Width = 900
- End
- Begin Label windowClasses
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2148
- TabIndex = 13
- Top = 900
- Width = 372
- End
- Begin Label Label2
- BackColor = &H00808000&
- Caption = "Classes:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1248
- TabIndex = 7
- Top = 912
- Width = 900
- End
- Begin Label referenceCount
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2160
- TabIndex = 38
- Top = 720
- Width = 360
- End
- Begin Label Label26
- BackColor = &H00808000&
- Caption = "References:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1260
- TabIndex = 37
- Top = 720
- Width = 900
- End
- Begin Label codeSegmentBytes
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2568
- TabIndex = 36
- Top = 540
- Width = 672
- End
- Begin Label codeSegments
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2148
- TabIndex = 35
- Top = 540
- Width = 372
- End
- Begin Label Label20
- BackColor = &H00808000&
- Caption = "Code segs:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1260
- TabIndex = 34
- Top = 540
- Width = 900
- End
- Begin Label localHeapBytes
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2568
- TabIndex = 19
- Top = 360
- Width = 672
- End
- Begin Label localHeap
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2148
- TabIndex = 17
- Top = 360
- Width = 372
- End
- Begin Label Label13
- BackColor = &H00808000&
- Caption = "Local heap:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 1260
- TabIndex = 16
- Top = 360
- Width = 900
- End
- Begin Label Label17
- Alignment = 2 'Center
- BackColor = &H00808000&
- Caption = "Bytes"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 2616
- TabIndex = 20
- Top = 120
- Width = 624
- End
- Begin Label Label16
- Alignment = 2 'Center
- BackColor = &H00808000&
- Caption = "#"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 192
- Left = 2196
- TabIndex = 18
- Top = 120
- Width = 324
- End
- End
- Begin CommandButton getSample
- BackColor = &H00808000&
- Caption = "&Sample"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 2400
- TabIndex = 1
- Top = 1020
- Width = 870
- End
- Begin CheckBox autoSample
- BackColor = &H00808000&
- Caption = "&Auto"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 255
- Left = 2520
- TabIndex = 0
- Top = 660
- Width = 630
- End
- Begin Timer sampleTimer
- Enabled = 0 'False
- Interval = 10000
- Left = 2640
- Top = 60
- End
- Begin Label freeDOSMemory
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 41
- Top = 1260
- Width = 915
- End
- Begin Label Label8
- BackColor = &H00808000&
- Caption = "Free DOS mem:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 40
- Top = 1260
- Width = 1275
- End
- Begin Label memoryInUse
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 31
- Top = 1080
- Width = 915
- End
- Begin Label Label23
- BackColor = &H00808000&
- Caption = "Memory in use:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 28
- Top = 1080
- Width = 1275
- End
- Begin Label freeMemory
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 30
- Top = 900
- Width = 915
- End
- Begin Label Label22
- BackColor = &H00808000&
- Caption = "Free memory:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 27
- Top = 900
- Width = 1275
- End
- Begin Label maxFreeBlock
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 29
- Top = 720
- Width = 915
- End
- Begin Label Label21
- BackColor = &H00808000&
- Caption = "Max free block:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 26
- Top = 720
- Width = 1275
- End
- Begin Label totalMemory
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 25
- Top = 540
- Width = 915
- End
- Begin Label Label19
- BackColor = &H00808000&
- Caption = "Total memory:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 24
- Top = 540
- Width = 1275
- End
- Begin Label classCount
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 3
- Top = 360
- Width = 915
- End
- Begin Label Label1
- BackColor = &H00808000&
- Caption = "Window classes:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 2
- Top = 360
- Width = 1275
- End
- Begin Label taskCount
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 10
- Top = 180
- Width = 915
- End
- Begin Label Label5
- BackColor = &H00808000&
- Caption = "Tasks:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 9
- Top = 180
- Width = 1275
- End
- Begin Label moduleCount
- Alignment = 1 'Right Justify
- BackColor = &H00808000&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 1320
- TabIndex = 5
- Top = 0
- Width = 915
- End
- Begin Label Label3
- BackColor = &H00808000&
- Caption = "Modules:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Left = 60
- TabIndex = 4
- Top = 0
- Width = 1275
- End
- Sub autoSample_Click ()
- If autoSample.value = 1 Then
- sampleTimer.enabled = -1
- Else
- sampleTimer.enabled = 0
- End If
- End Sub
- Sub Form_Load ()
- hTMList = 0
- screen.mousePointer = 11
- maForm.left = 0
- maForm.top = 0
- Call retrieveData
- screen.mousePointer = 0
- End Sub
- Sub getSample_Click ()
- Call retrieveData
- End Sub
- Function LOWORD (dw&) As Integer
- dw2& = dw& / 65536
- dw2& = dw2& * 65536
- LOWORD = (dw& - dw2&)
- End Function
- Function makeLong (ByVal i%) As Long
- If i% < 0 Then
- makeLong = CLng(32767) + (CLng(32769) + CLng(i%))
- Else
- makeLong = CLng(i%)
- End If
- End Function
- Sub retrieveData ()
- Dim ce As sCLASSENTRY
- Dim te As sTASKENTRY
- Dim me As sMODULEENTRY
- Dim mi As sMEMMANINFO
- mOld = screen.mousePointer
- screen.mousePointer = 11
- iDos% = 0
- dwDos& = 0
- dw& = GlobalDOSAlloc(4096)
- While dw& <> 0 And iDos% < MAX_DOSALLOCS
- ahDosMem(iDos%) = LOWORD(dw&)
- iDos% = iDos% + 1
- dwDos& = dwDos& + 4096
- dw& = GlobalDOSAlloc(4096)
- Wend
- While iDos% <> 0
- iDos% = iDos% - 1
- x% = GlobalDosFree(ahDosMem(iDos%))
- Wend
- freeDOSMemory.caption = Str$(dwDos&)
- iListItem% = tmList.listIndex
- If iListItem% <> -1 Then
- tmItem$ = tmList.list(iListItem%)
- Else
- tmItem$ = ""
- End If
- iClassCount% = 0
- ce.dwSize = Len(ce)
- r% = ClassFirst(ce)
- While r% <> 0
- iClassCount% = iClassCount% + 1
- r% = ClassNext(ce)
- Wend
- classCount.caption = Str$(iClassCount%)
- If tmList.listCount > 0 Then
- If hTMList = 0 Then
- tmList.SetFocus
- hTMList = getFocus()
- End If
- If hTMList <> 0 Then
- l% = SendMessage(hTMList, LB_RESETCONTENT, 0, 0)
- End If
- End If
- iTaskCount% = 0
- te.dwSize = Len(te)
- r% = TaskFirst(te)
- While r% <> 0
- iTaskCount% = iTaskCount% + 1
- If showTasks.value = -1 Then
- tmList.AddItem LCase$(RTrim$(te.szModule))
- End If
- r% = TaskNext(te)
- Wend
- taskCount.caption = LTrim$(Str$(iTaskCount%))
- iModuleCount% = 0
- me.dwSize = Len(me)
- r% = ModuleFirst(me)
- While r% <> 0
- iModuleCount% = iModuleCount% + 1
- If showModules.value = -1 Then
- tmList.AddItem LCase$(RTrim$(me.szModule))
- End If
- r% = ModuleNext(me)
- Wend
- moduleCount.caption = Str$(iModuleCount%)
- mi.dwSize = Len(mi)
- x% = MemManInfo(mi)
- totalMemory.caption = LTrim$(Str$(mi.dwTotalLinearSpace * mi.wPageSize))
- maxFreeBlock.caption = LTrim$(Str$(mi.dwLargestFreeBlock))
- freeMemory.caption = LTrim$(Str$(mi.dwFreeLinearSpace * mi.wPageSize))
- memoryInUse.caption = LTrim$(Str$(Val(totalMemory.caption) - Val(freeMemory.caption)))
- If tmItem$ <> "" Then
- For i% = 0 To tmList.listCount
- If tmItem$ = tmList.list(i%) Then
- tmList.listIndex = i%
- End If
- Next i%
- End If
- Call retrieveTaskModule
- screen.mousePointer = mOld
- End Sub
- Sub retrieveTaskModule ()
- Dim ce As sCLASSENTRY
- Dim te As sTASKENTRY
- Dim ge As sGLOBALENTRY
- Dim li As sLOCALINFO
- Dim le As sLOCALENTRY
- Dim me As sMODULEENTRY
- mOld = screen.mousePointer
- screen.mousePointer = 11
- tStackSize.caption = ""
- windowClasses.caption = ""
- tStackUsed.caption = ""
- localHeap.caption = ""
- localHeapBytes.caption = ""
- referenceCount.caption = ""
- codeSegments.caption = ""
- codeSegmentBytes.caption = ""
- tTaskMemory.caption = ""
- tTaskMemoryBytes.caption = ""
- If tmList.text <> "" Then
- te.dwSize = Len(te)
- ce.dwSize = Len(ce)
- ge.dwSize = Len(ge)
- li.dwSize = Len(li)
- le.dwSize = Len(le)
- me.dwSize = Len(me)
- hMod% = 0
- hTask% = 0
- r% = TaskFirst(te)
- While r% <> 0
- If strcmp(tmList.text, LCase$(RTrim$(te.szModule))) = 0 Then
- b& = makeLong(te.wStackBottom)
- t& = makeLong(te.wStackTop)
- m& = makeLong(te.wStackMinimum)
- tStackSize.caption = Str$(b& - t&)
- tStackUsed.caption = Str$(b& - m&)
- hMod% = te.hModule 'not hInst...
- hTask% = te.hTask
- r% = 0
- Else
- r% = TaskNext(te)
- End If
- Wend
- r% = ModuleFirst(me)
- While r% <> 0
- If strcmp(tmList.text, LCase$(RTrim$(me.szModule))) = 0 Then
- If hMod% = 0 Then
- hMod% = me.hModule 'not hInst...
- End If
- referenceCount.caption = Str$(me.wUsageFlags)
- r% = 0
- Else
- r% = ModuleNext(me)
- End If
- Wend
- If hMod% <> 0 Then
- iClasses% = 0
- r% = ClassFirst(ce)
- While r% <> 0
- If ce.hInst = hMod% Then
- iClasses% = iClasses% + 1
- End If
- r% = ClassNext(ce)
- Wend
- windowClasses.caption = Str$(iClasses%)
- taskMem& = 0
- taskAllocs% = 0
- codeCount% = 0
- codeBytes& = 0
- r% = GlobalFirst(ge, GLOBAL_ALL)
- While r% <> 0
- If ge.hOwner = hMod% Then
- Select Case ge.wType
- Case GT_CODE
- codeCount% = codeCount% + 1
- codeBytes& = codeBytes& + ge.dwBlockSize
- Case GT_DGROUP
- b& = 0
- c& = 0
- If ge.wHeapPresent = 1 Then
- x% = LocalInfo(li, ge.hBlock)
- q% = LocalFirst(le, ge.hBlock)
- While q% <> 0
- If le.wFlags <> LF_FREE Then
- c& = c& + 1
- b& = b& + makeLong(le.wSize)
- End If
- q% = LocalNext(le)
- Wend
- localHeap.caption = LTrim$(Str$(c&))
- localHeapBytes.caption = LTrim$(Str$(b&))
- End If
- End Select
- ElseIf ge.hOwner = hTask% Then
- taskMem& = taskMem& + ge.dwBlockSize
- taskAllocs% = taskAllocs% + 1
- End If
- r% = GlobalNext(ge, GLOBAL_ALL)
- Wend
- If localHeapBytes.caption = "" Then
- localHeap.caption = ""
- localHeapBytes.caption = ""
- End If
- If hTask% <> 0 Then
- tTaskMemory.caption = LTrim$(Str$(taskAllocs%))
- tTaskMemoryBytes.caption = LTrim$(Str$(taskMem&))
- End If
- codeSegments.caption = LTrim$(Str$(codeCount%))
- codeSegmentBytes.caption = LTrim$(Str$(codeBytes&))
- End If
- End If
- screen.mousePointer = mOld
- End Sub
- Sub sampleTimer_Timer ()
- Call retrieveData
- End Sub
- Sub showModules_Click ()
- Call retrieveData
- End Sub
- Sub showTasks_Click ()
- Call retrieveData
- End Sub
- Function strcmp (ByVal s1$, ByVal s2$) As Integer
- l = Len(s1$)
- If Left$(s1$, l) = Left$(s2$, l) Then
- strcmp = 0
- Else
- strcmp = 1
- End If
- End Function
- Sub tmList_Click ()
- Call retrieveTaskModule
- End Sub
-